############################################################################################################ # # LicenseUtils Script 3.11.2. (c) Radio IP Software 2015 # # Script to perform actions on licenses # ############################################################################################################ function global:get-license() { $license = Get-Variable -Name __license -Scope Global -ErrorAction SilentlyContinue; if ( ($license -eq $null) -or ($license.objName -eq $null) ) { $global:__license = New-Object -ComObject radioip.LicenseServer; $license = $global:__license; } $license; } function global:license-master() { $license = get-license $license.Master } function global:updateMacs() { $encryptedPassword = read-host -Prompt "Please enter password " -AsSecureString $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($encryptedPassword)) $license = get-license $license.UpdateMacs($password); } function global:start-licenseserver { net start "Radio IP License Server" } function global:stop-licenseserver { net stop "Radio IP License Server" } Write-Host -ForegroundColor Red @" LicenseUtils 3.11.2 loaded. (c) Radio IP Software 2015 "@ write-host -ForegroundColor White @" Available functions: get-license Returns a Multip license object. license-master Returns the master state of the license server. start-licenseserver Starts Mult-IP License Server service. stop-licenseserver Stops Mult-IP License Server service. "@